package org.mspring.mlog.entity.stat;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 帖子统计信息
 * 
 * @author Gao Youbo
 * @since 2013年9月5日
 */
@Entity
@Table(name = "topic_stat")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class TopicStat implements Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -8665571580929849339L;

    private Long id;
    private Long views;
    private Long replys;

    /**
     * 
     */
    public TopicStat() {
        // TODO Auto-generated constructor stub
    }

    /**
     * @param id
     */
    public TopicStat(Long id) {
        super();
        this.id = id;
    }

    /**
     * @param id
     * @param views
     * @param replys
     */
    public TopicStat(Long id, Long views, Long replys) {
        super();
        this.id = id;
        this.views = views;
        this.replys = replys;
    }

    @Id
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "views", length = 30)
    public Long getViews() {
        return views;
    }

    public void setViews(Long views) {
        this.views = views;
    }

    @Column(name = "replys", length = 30)
    public Long getReplys() {
        return replys;
    }

    public void setReplys(Long replys) {
        this.replys = replys;
    }

}
